<!DOCTYPE html>
<html>
	<head>
         <meta charset="UTF-8" />
		<title></title>
	
	</head>
	<body>
	    <p>表单1（验证消息打印在控制台）</p>
		<form class="mrc-form" id="form1">
				<input type="text" name="title" id="user"  mrc-verify="required|email" placeholder="请输入邮箱">
				<input type="text" name="password"  id="password"  mrc-verify="required|number" placeholder="请输入数字">				
			    <button  mrc-submit mrc-filter="formDemo">立即提交</button>
		</form>	
	 <input type="text" name="title" id=""  mrc-verify="required|email" placeholder="请输入邮箱">
		
		<p>表单2（验证消息打印在控制台）</p>
	   <form class="mrc-form" id="form2">
				<input type="text" name="title" mrc-verify="required|number" placeholder="请输入数字">
			    <button mrc-submit mrc-filter="formDemo2">立即提交</button>
		</form>	
	</body>
</html>
<script type="text/javascript" src="js/jquery.min.js" ></script>
<script type="text/javascript" src="js/Verify.js" ></script>
<script type="text/javascript">
 mrcForm.on('submit(formDemo)',function(data){	   
    console.log(data.eventlist[0].msg);//验证错误消息
	console.log(data.eventlist[0].elem);//验证不通过的元素 相当于 document.getElementById(id)
    return false;
  });
  
 mrcForm.on('submit(formDemo2)',function(data){
    console.log(data); //打印返回对象
    return false;
   }); 


 mrcForm.on('blur(form1)',function(data){
    console.log('f1'+data); //打印返回对象
    return false;
  }); 

 mrcForm.on('blur(form2)',function(data){
    console.log('f2:'+data); //打印返回对象
    return false;
  }); 

//$('#user').blur(function(){
// console.log("helloworld")
//})


</script>